package com.shijie.newvideo;

// RetrofitClient.java

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class RetrofitClient {

    private static final String BASE_URL = "https://vod.cyzone.cn/api.php/provide/";
    private static Retrofit retrofit = null;

    // 获取Retrofit实例
    public static Retrofit getClient() {
        if (retrofit == null) {
            retrofit = new Retrofit.Builder()
                    .baseUrl(BASE_URL)
                    .addConverterFactory(GsonConverterFactory.create())
                    .build();
        }
        return retrofit;
    }

    // 获取API服务实例
    public static RequestRxService getApiService() {
        return getClient().create(RequestRxService.class);
    }
}
